﻿<cfcomponent>

    <!--- Verify Network Password - RE-FACTORED!--->
    <cffunction name="PayStub_CheckNetworkPassword" returntype="boolean" output="no">
        <cfargument name="pwd" type="string" required="yes" />
        <cfset var FUNC = StructNew() />        
        <cfset FUNC.Domain = Iif(Left(SESSION.myUserInfo.Login, 4) NEQ "ANMC", DE('SCF'), DE('ANMC')) />
        <!--- For ANMC double-dippers, strip out the ANMC prefix from their Rosetta Username. --->
        <cfset FUNC.UserName = Iif(Left(SESSION.myUserInfo.Login, 4) NEQ "ANMC", DE(SESSION.myUserInfo.Login), DE(Mid(SESSION.myUserInfo.Login, 5, 99))) />
        <cfntauthenticate domain="#FUNC.Domain#" username="#FUNC.UserName#" password="#ARGUMENTS.pwd#" result="FUNC.resultAuthenticate" />        
        <cfset FUNC.retval = FUNC.resultAuthenticate.auth />        
        <cfreturn FUNC.retval />    
    </cffunction>
    
    
    <!--- PDF Document --->
    <cffunction name="PDFCreation" returntype="any" output="yes">
        <cfargument name="url" type="string" required="yes" />
        <cfdocument src="url" name="mypdf" format="pdf" />
    </cffunction>

</cfcomponent>